﻿package com.crl.module.npc.model.action
{
	import com.crl.module.npc.controller.INpcLogic;
	
	/**
	 * npc对于不同条件 做不同action
	 * @author crl;
	 * 
	 */	
	public class IfAction extends AbstractAction
	{
		private var trueAction:IAction;
		private var falseAction:IAction;
		public function IfAction(npc:INpcLogic)
		{
			super(npc);
			this.type="if";
		}
		
		override public function parseXML(xml:XML):void{
			
			
			var trueAction:IAction;
			var falseAction:IAction;
			this.trueAction=trueAction;
			this.falseAction=falseAction;
		}

		override public function execute():void
		{
			if(1==1){
				this.trueAction.execute();
			}else{
				this.falseAction.execute();
			}
		}
		
	}
}